Computer memory system for selecting memory buses according to physical memory organization information stored in virtual address translation tables

ABSTRACT

Systems and methods for program directed memory access patterns including a memory system with a memory, a memory controller and a virtual memory management system. The memory includes a plurality of memory devices organized into one or more physical groups accessible via associated busses for transferring data and control information. The memory controller receives and responds to memory access requests that contain application access information to control access pattern and data organization within the memory. Responding to memory access request includes accessing one or more memory devices. The virtual memory management system includes: a plurality of page table entries for mapping virtual memory addresses to real addresses in the memory; a hint state responsive to application access information for indicating how real memory for associated pages is to be physically organized within the memory; and a means for conveying the hint state to the memory controller.

BACKGROUND OF THE INVENTION

This invention relates generally to computer memory systems and memory management, and more particularly to methods and systems for program directed memory access patterns.

Contemporary high performance computing main memory systems are generally composed of one or more dynamic random access memory (DRAM) devices, which are connected to one or more processors via one or more memory control elements. Overall computer system performance is affected by each of the key elements of the computer structure, including the performance/structure of the processor(s), any memory cache(s), the I/O subsystem(s), the efficiency of the memory control function(s), the main memory device(s), and the type and structure of the memory interconnect interface(s).

Extensive research and development efforts are invested by the industry, on an ongoing basis, to create improved and/or innovative solutions to maximizing overall system performance and density by improving the memory system/subsystem design and/or structure. High-availability systems present further challenges as related to overall system reliability due to customer expectations that new computer systems will markedly surpass existing systems in regard to mean-time-between-failure (MTBF), in addition to offering additional functions, increased performance, increased storage, lower operating costs, etc. Other frequent customer requirements further exacerbate the memory system challenges, and include such items as ease of upgrade and reduced system environmental impact (such as space, power and cooling).

FIG. 1 relates to U.S. Pat. No. 5,513,135 to Dell et al., of common assignment herewith, and depicts an early synchronous memory module. The memory module depicted in FIG. 1 is a dual in-line memory module (DIMM). This module is composed of synchronous DRAMs 8, buffer devices 12, an optimized pinout, and an interconnect and capacitive decoupling method to facilitate high performance operation. The patent also describes the use of clock re-drive on the module, using such devices as phase-locked loops (PLLs).

FIG. 2 relates to U.S. Pat. No. 6,173,382 to Dell et al., of common assignment herewith, and depicts a computer system 10 which includes a synchronous memory module 20 that is directly (i.e. point-to-point) connected to a memory controller 14 via a bus 40, and which further includes logic circuitry 24 (such as an application specific integrated circuit, or “ASIC”) that buffers, registers or otherwise acts on the address, data and control information that is received from the memory controller. The memory module 20 can be programmed to operate in a plurality of selectable or programmable modes by way of an independent bus, such as an inter-integrated circuit (12C) control bus 34, either as part of the memory initialization process or during normal operation. When utilized in applications requiring more than a single memory module connected directly to a memory controller, the patent notes that the resulting stubs can be minimized through the use of field-effect transistor (FET) switches to electrically disconnect modules from the bus.

Relative to U.S. Pat. No. 5,513,135, U.S. Pat. No. 6,173,382 further demonstrates the capability of integrating all of the defined functions (address, command, data, presence detect, etc) into a single device. The integration of function is a common industry practice that is enabled by technology improvements and, in this case, enables additional module density and/or functionality.

FIG. 3, from U.S. Pat. No. 6,510,100 to Grundon et al., of common assignment herewith, depicts a simplified diagram and description of a memory system 10 that includes up to four registered dual inline memory modules (DIMMs) 40 on a traditional multi-drop stub bus channel. The subsystem includes a memory controller 20, an external clock buffer 30, registered DIMMs 40, an address bus 50, a control bus 60 and a data bus 70 with terminators 95 on the address bus 50 and the data bus 70. Although only a single memory channel is shown in FIG. 3, systems produced with these modules often included more than one discrete memory channel from the memory controller, with each of the memory channels operated singly (when a single channel was populated with modules) or in parallel (when two or more channels were populated with modules) to achieve the desired system functionality and/or performance.

FIG. 4, from U.S. Pat. No. 6,587,912 to Bonella et al., depicts a synchronous memory module 210 and system structure in which the repeater hubs 320 include local re-drive of the address, command and data to the local memory devices 301 and 302 via buses 321 and 322; generation of a local clock (as described in other figures and the patent text); and the re-driving of the appropriate memory interface signals to the next module or component in the system via bus 300.

Memory systems may utilize translation look aside tables in order to permit computer data to be stored in one or more storage locations best suited to data content, size and importance. Translation look aside tables (also commonly referred to as “virtual address translation tables” and “directory look aside tables”) are used to convert virtual addresses into real addresses, thus allowing the implementation of a virtual memory system. FIG. 5, from U.S. Pat. No. 3,825,904 to Burk et al., of common assignment herewith, depicts a block diagram of a translation process from a virtual address to a real address. U.S. Pat. No. 3,825,904 also describes the use of a translation look aside table that includes a virtual address and a corresponding real address for translating between virtual and real addresses.

Most high performance computing main memory systems employ multiple banks of DRAM devices that are statically configured to have a group of banks participate to support an access across a memory interface, often comprised of parallel memory channels operating in unison. The memory channels, each generally including one or more busses, may include direct connections to DRAM devices, connections to one or more interface devices that are directly connected to DRAM devices, connections to one or more interface devices that are connected to DRAM devices, and/or include one or more high speed busses connected to memory hub devices, which themselves connect directly to memory devices or one or more alternative structures. This scheme of utilizing parallel channels in unison to access a group of banks minimizes latency by having all the available bandwidth allocated to each request, usually optimized for a cache line transfer of sixty-four to two hundred fifty-six bytes. Generally, the memory controller is responsible for generating and checking the error correction code (ECC) for the data that is distributed across the one or more channels.

Some memory systems provide a configuration that partitions the memory interface and interconnected memory banks so that they are able to operate independently, in order to increase the number of concurrent independent requests serviced at a given time. This can be beneficial where critical data is transferred first and the memory system is not heavily loaded, or where accesses tend to be short and the system provides a means to truncate the access. Moreover, certain data structures are best referenced as stride address or sparse reference patterns. However, applications could benefit (e.g., from a computing application performance standpoint) from both memory system access patterns, depending on the address ranges associated with specific processing and data structures. Therefore, what is needed is the ability for a computer application to be able to dynamically switch between different memory access patterns based on attributes associated with the data.

BRIEF SUMMARY OF THE INVENTION

Embodiments include a computer memory system for storing and retrieving data. The memory system includes a memory, a memory controller and a virtual memory management system. The memory includes a plurality of memory devices organized into one or more physical groups, where each group is accessible via an associated bus for transferring data and control information. The memory controller receives and responds to memory access requests that contain application access information to control access pattern and data organization within the memory. Responding to memory access request includes accessing one or more memory devices in one or more of the physical groups via the associated busses. The virtual memory management system includes a plurality of page table entries for mapping virtual memory addresses to real addresses in the memory. The virtual memory management system also includes a hint state responsive to application access information for indicating how real memory for associated pages is to be physically organized within the memory; and a means for conveying the hint state to the memory controller when a memory access request is directed to the memory controller to access the memory.

Embodiments also include a memory system with a plurality of busses for transferring information to memory devices and a memory controller in communication with the busses. The memory controller receives memory access requests and initiates an information transfer on one or more of the busses to respond to the memory access requests. The memory controller determines on a cycle by cycle basis which of the busses are required to respond to each of the memory access requests based on a memory access pattern associated with each memory access request.

Embodiments further include a method for processing a read request in a memory system. The method includes receiving a read request specifying a virtual address. A virtual address to real address mapping is completed and the real address is forwarded to a memory controller that is in communication with a plurality of busses. One or more of the busses required to process the read request are selected and then accessed. Data responsive to the read request is read from one or more memory devices attached to the required busses. The data is transmitted to a requestor.

Embodiments further include a method for processing a write request in a memory system. The method includes receiving a write request including application access information at a memory controller that is in communication with a plurality of busses. One or more busses required to process the write request are selected based on the application access information. Only the busses required to process the write request are accessed. Data responsive to the write request is written to one or more memory devices attached to the required busses.

Other systems, methods, and/or computer program products according to embodiments will be or become apparent to one with skill in the art upon review of the following drawings and detailed description. It is intended that all such additional systems, methods, and/or computer program products be included within this description, be within the scope of the present invention, and be protected by the accompanying claims.

BRIEF DESCRIPTION OF THE DRAWINGS

Referring now to the drawings wherein like elements are numbered alike in the several FIGURES:

FIG. 1 depicts an exemplary early synchronous memory module;

FIG. 2 depicts an exemplary computer system with a synchronous memory module that is directly connected to a memory controller;

FIG. 3 depicts an exemplary memory system with a traditional multi-drop stub bus channel;

FIG. 4 depicts a synchronous memory module and system structure which includes a point-to-point bus with bus repeaters;

FIG. 5 depicts a block diagram of a translation process from a virtual address to a real address;

FIG. 6 depicts a block diagram of a computer memory system which includes multiple independent multi-drop memory interface busses that operate in unison to support a single data access request;

FIG. 7 depicts a block diagram of a computer memory system which includes multiple independent cascade interconnect memory interface busses that operate in unison to support a single data access request;

FIG. 8 depicts a block diagram of a computer memory system which includes multiple independent memory interface busses that dynamically switch between operating in unison and operating in parallel (to support multiple data access requests);

FIG. 9 depicts a simplified data flow associated with the memory structure shown in FIG. 7;

FIG. 10 depicts a simplified data flow associated with the memory structure shown in FIG. 8;

FIGS. 11 a-c depict exemplary real to physical address mappings that may be implemented by exemplary embodiments based on hint data stored in a virtual address translation table (VATT);

FIG. 12 is a process flow for processing a read request in accordance with exemplary embodiments; and

FIG. 13 is a process flow for processing a write request in accordance with exemplary embodiments.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Exemplary embodiments may be implemented by computer memory systems that have two or more independent channels, with each channel including one or more busses interconnecting a memory controller to an array of memory devices. In exemplary embodiments, the memory controller directs requests for access to and from the memory devices via the appropriate channel(s) and associated bus(ses) to satisfy the requests. Requests to the memory controller include access “hints” that indicate how the memory controller should reference the data. These hints implicitly control how data is distributed in the physical memory for optimal reference. The data associated with the request may be stored/accessed via a single channel; across a combination of multiple channels; or across all channels attached to the memory controller. In exemplary embodiments, the memory controller can dynamically shift the channel utilization based on the access hint.

In exemplary embodiments, an application indicates to the memory controller how the data should be accessed (e.g., channel utilization and/or interleave method, the ECC encode/decode method, etc), implying the data organization and optimal access pattern. In exemplary embodiments, entries in a virtual address translation table (VATT) maintain states for defining how the data identified by a virtual address is mapped in the physical memory. This state is conveyed to the memory controller along with the real address and other attributes for the memory request. In exemplary embodiments, the access hint attribute(s) (stored, for e.g., in the VATT) is used by the processor and/or cache controller to indicate a data reference size, specific data transfer busses or other information indicating data reference characteristics. Upon receipt of an access request which includes this hint information, the memory controller schedules accesses to the memory to maximize throughput and enable the appropriate error encoding or decoding circuitry for the data transfer(s).

In the configuration depicted in FIG. 6, multiple independent multi-drop memory interface busses may be logically aggregated together to operate in unison to support a single independent access request at a higher bandwidth with data and error detection/correction information distributed or “striped” across the parallel busses and associated devices. FIG. 6 depicts a system composed of two processors 602 which share a common memory controller 604, which is integrated into a “North Bridge Chip” 606. The memory controller 604 has two memory interface channels, each including one of the two memory busses 608, with each bus 608 connected to one or more memory subsystems 610 via a multi-drop net structure. As shown by the oval 612 linking the two memory busses 608, when both busses 608 are populated with one or more memory subsystems 610, the memory controller 604 may logically aggregate the two (or more) memory channels and associated busses 608 into a single logical bus such that the physical busses operate in unison to support a single access request. In alternate embodiments, the two or more busses 608 may operate as independent busses. Some systems further enable operation when a subset of the memory busses 608 are populated with memory subsystems 610. In this case, the one or more populated memory busses 608 may operate in unison to support a single access request, or operate independently to support unique memory access requests.

FIG. 7 depicts a contemporary system composed of an integrated processor 702, which contains one or more processor elements and an integrated memory controller 704. In the configuration depicted in FIG. 7, multiple independent multi-drop memory interface busses 706 are logically aggregated together to operate in unison to support a single independent access request at a higher bandwidth with data and error detection/correction information distributed or “striped” across the parallel busses and associated devices. The memory controller 704 attaches to four narrow/high speed point-to-point memory busses 706, with each bus 706 connecting one of the several unique memory controller interface channels to a daisy-chained memory subsystem 708 (or memory module) which includes at least a hub device and one or more memory devices. As indicated by the oval 710 encompassing the four memory busses 706, the operation is fundamentally identical to that of FIG. 6, although this structure includes a larger number of busses 706 in part due to the number of pins made available for this purpose resulting from the use of the narrow/high speed busses (links) 706. The system structures shown in FIGS. 6 and 7 share a similar memory channel interface pincount, however optimal bus designs using the structure shown in FIG. 7 can offer significantly improved memory bandwidth to the memory controller and processor(s) due to the parallel operation of the four memory busses as compared to the two busses shown in FIG. 6.

As further shown in FIG. 7, computer system memory controllers may be integrated together with one or more processor chips and supporting logic, packaged in a discrete chip (commonly called a “northbridge” chip), included in a multi-chip carrier with the one or more processors and/or supporting logic, or packaged in various alternative forms that best match the application/environment. Any of these solutions may or may not employ one or more narrow/high speed busses to connect to one or more hub chips and/or memory devices. In any case, data access is limited to one or two policies as determined by the system configuration, generally cache line fetch size with critical data first, but otherwise contiguous.

Computer memory systems are typically comprised of one or more independent memory channels, with each of the one or more memory channels comprising the interface logic, the memory bus(ses) and the memory subsystems (e.g. memory modules) associated with the minimum data width with which the system can operate (e.g. 64 or 72 bits). Each channel includes one or more memory busses or links which interconnect one or more memory controller(s) to one or more memory devices, such that the controller directs requests for access to and from the memory via the appropriate bus(ses) to satisfy the requests. As used herein, the term “bus” refers to a high speed conductive or optical fiber subsystem that provides a path between a processor/computer and control units and/or buffers associated with peripheral, memory or other devices. A “channel” comprises everything associated with the interface between, for example, a memory controller and a memory module, including one or more busses. A data bus, address bus and control signals, despite their names, constitute a single bus since each is useless without the others. A bus may include a plurality of signal lines, where each signal line has two or more connection points that form a main transmission path that electrically connects two or more transceivers, transmitters, and/or receivers.

FIG. 8 depicts an exemplary memory subsystem that may be implemented by exemplary embodiments of the present invention to dynamically shift between two or more memory channel (and thereby bus), utilization patterns. In the configuration depicted in FIG. 8, a subset of the available independent memory interface busses are logically aggregated together to operate in unison. The memory subsystem includes an integrated processor chip 802 with an embedded memory controller 804. The memory controller 804 is in communication with the one or more memory modules 810 (in this case DIMMs) via point-to-point busses (or links) 806 that include upstream bus(ses) used to send information (e.g., data, status, error correction codes and error flags) from the memory modules 810 to the memory controller 804 and downstream bus(ses) that send information from the memory controller 804 to the memory modules 810. In the example depicted in FIG. 8, the memory modules 810 are organized into one or more physical groups, as depicted by the ovals linking groups of one, two, four or other busses, with each physical group enabling parallel access, on a clock-by-clock basis, to the one or more memory modules 810 attached to the busses 806.

Memory modules 810 include one or more hub devices 812 which convert the information on the narrow/high speed bus 806 to the appropriate format (command sequence(s), address(es), timings, levels and other attributes) required to enable operation of the selected memory technology. The one or more memory devices 814 (e.g., DRAMs) may be organized as one or more memory ‘ranks’, with each rank comprised of the one or more memory devices 814 involved in a single write or read operation (e.g. a 72 bit data width comprised of nine memory devices each having an 8 bit interface).

As depicted in FIG. 8, the memory controller 804 receives and responds to memory access requests from the processor and/or cache controller circuitry resulting from an application on the integrated processor chip 802. In general, the memory access requests begin as a virtual address. In exemplary embodiments, write memory access requests include “hint” information which will result in VATT entry(ies) associated with the integrated processor chip 802 including information related to the one or more memory channel(s) and associated error detection and/or correction circuitry to be used for both the write and read operations for the specified real address range. This hint information is utilized by the memory controller 804 to determine the appropriate memory busses 806 and associated error detection and/or correction circuitry to be used for the write operation. For example, the application information may be utilized to determine that only a single (i.e: one-way interleave) bus 806 is required to store the data on a given module 810. Alternatively, the application information may be utilized to determine that two (two-way interleave) or four (four-way interleave) busses 806 are required to store the data on the targeted memory module(s) 810. All, or a subset of the busses 806 may be required to store the data on the memory modules 810, and the number and location of memory modules 810 may change from one memory access request to another.

The number four is just an exemplary number of busses 806 and any number of busses 806 connected to memory modules 810 may be available to the memory controller 804. One or more of the busses 806 may be utilized by embodiments of the present invention to respond to each of the memory access requests. Which bus(ses) 806 is required for a particular write operation is determined based on the memory access request and the hint information associated with the memory access request. The number of required busses 806 may vary from one memory access request to another. In addition, more than one memory request may be serviced concurrently (in the same cycle) as long as the concurrent or overlapping accesses don't require access to the same busses 806. As described later herein, the information indicating what bus(ses) 806 are required to access the requested data is stored along with the real address of the data, in the VATT.

In exemplary embodiments, computer software programs specify expected retrieval requirements to indicate how the data should be organized and referenced within the main memory. Access hints are determined from the expected retrieval requirements and these access hints are conveyed to the operating system software when the application requests memory resources for data storage from the operating system software. The application retrieval requirements may be specified in the software at the source code level, or in compilation library software modules or the compiler may introduce them autonomously. In exemplary embodiments, when the application is compiled or written, memory allocation constructs (like malloc for the C language) convey what the preferred access granularity should be (say, full, half or quarter cache line), and this information is stored as an access hint, or hint state, by the operating system associated with the real address range established for the memory allocation. Compiling the application for computer systems that do not support this invention will not include the retrieval requirements in the executable program code and data access will be performed without the benefit of the access hint (i.e., the way that is currently performed). In this manner, both new applications that specifying retrieval requirements and existing applications that do not specify retrieval requirements can be serviced by the same memory controller and the same memory devices.

Memory data organization “hint” information may be defined directly in the memory controller via programmable hardware register state, and/or by programmable hardware register address range registers, such that memory access request addresses are compared to the programmed range registers to determine when and which hint attribute, if any, applies to a request to access the memory. Further, a hint may be encoded in processor instructions, such that certain instruction variants are used to suggest that data be accessed in a manner specific to the instruction.

In exemplary embodiments, the hint information is associated to the real address by storing the access hint, or hint state, in a VATT page entry that is established by the operating system to allocate a memory resource, upon request, to a software application. When the application program references memory, it does so with a virtual address, and that is used to select, via the VATT, a real address (ultimately corresponding to a physical location on one or more memory devices) supported by the memory controller in the physical memory. The VATT contains an entry for each block or “page” of virtual memory addresses, and these entries maintain the association of the virtual address to the real address, and contain various attributes for the page. Exemplary embodiments expand the supported attributes in page table entries to include an access hint, or hint state, to indicate data organization. Moreover, data may be accessed by a subset or all of the memory channels via independent page table entries that are mapped to all or portions of the same real address range (see FIG. 11 and accompanying description). Input/output (I/O) adapter hardware may also incorporate address translation registers, generally maintained by software. These registers include equivalent page data organization hint states that are conveyed to the memory controller with requests to access the memory. In either case, the hint state is reflected in the memory request to the memory controller on special signals, along with the real address and other conventional attributes.

The memory “hints” can affect memory accesses in numerous manners. In exemplary embodiments, the hints are used for selecting a single memory channel (and therefore selecting the busses associated with the channel) or a combination of two or more memory channels; defining optimal access patterns for non-sequential, non-contiguous, and abridged data for non-cacheable and/or sparse data; as well as defining a “clear” to indicate page clearing after a page is released back to the operating system by the application. Exemplary memory systems employ memory hub devices between the memory controller and the DRAM devices. Memory request hints are used to control the “memory interleave” or the number of independent memory busses and associated memory subsystems that are used to service a single request, as well as what error correction encode and decode circuits are to be used to support the ECC for the desired interleave.

Virtual memory addresses may be mapped across multiple memory channels and associated hub and memory devices in a variety of manners. For example, addresses may be hashed to distribute data to best facilitate optimal memory reference sizes and distribution patterns. In exemplary embodiments, optimal cache line referencing is enabled as well as short or abridged references to parts of the cache line. This facilitates maximum throughput and minimum latency when referencing the same region by cache line or by sub-cache line. For example, where four channels service a one hundred twenty-eight byte cache line, each channel provides thirty-two bytes, so the same data may be referenced as two channels with a sixty-four byte reference or with one channel with a thirty-two byte or smaller reference. References to parts of a cache line are indicated by data lane enables, and are transmitted to the memory controller with the access request and as well as back to the requestor with the reply data. Data lane enables are implementation dependent for read reply data, as the requester can retain the request enables, to avoid having to retransmit them with the reply.

In exemplary embodiments, the memory controller employs error correction code (ECC) circuits to generate and check the ECC for data being written to and read from the one or more memory devices. These circuits are selected based on the access “interleave” (number of participating memory channels), such that a four-way interleave requires data and ECC redundant bits be distributed across four channels, or as two or four ECC code words accessed in parallel but processed independently. Interleave ECC may be processed either by the memory controller or within the hub chip itself, such that write data ECC may be generated by the memory controller or by the ECC circuits in the hub chip before data is propagated to the DRAM.

FIG. 9 depicts an exemplary data path circuit for responding to a memory access request that utilizes four channels including ECC circuitry for distributing ECC bits across the four busses 806. FIG. 9 depicts a processor 902 that initiates memory access requests to a memory controller 804. The processor 902 includes a local cache memory 908, a VATT 938 and one or more central processing units (CPUs) 906. The local cache memory 908 transfers data to the CPU 906 via a communication data link 910 and the CPU 906 transfers requests for data to the local cache memory 908 via a communication data link 912. The CPU 906 passes access requests to the VATT 938 via address/command link 910, and the VATT maps the virtual address access request to a ‘real’ address, which is passed to cache memory 908 via link 911, and may further be passed to the memory controller, in conjunction with command, priority and related information in parallel with the transfer to the cache, upon determination that the cache does not include the real address range associated with the CPU request, or via an alternate cache access algorithm.

In response to direction from the processor 902, data information 914 and address, command, and associated information 918 is transmitted to the memory controller, which in combination communicate an operation such as a memory access request to write data to a write queue 922 in the memory controller 804. Control block 940 decodes the address, command and associated information from the processor and selects and configures the write queue and ECC generator circuitry during write operations and ECC check/correct circuitry during read operations. Errors identified during data transfer and/or ECC operations are reported to control block 940 and/or error lines 936 for error recovery and communication to processor 902, depending on the system design. Although not shown, additional circuitry in the memory controller, such as bus transceivers, configuration registers, timing control circuitry, self-test circuitry, etc. also participate in the memory interface operation, but are not shown as these functions are widely practiced in the art. In the exemplary embodiment depicted in FIG. 9, there are four interface busses 806 each including a sending bus and a receiving bus. The ECC generator 926, depending on the ECC structure used (e.g. 64/72, 128/144, etc) generates the one or more ECC code(s) associated with data being written, with the combined data and ECC information applied across all four busses 806. The ECC code (e.g., 8 bits for each 64 bits of data) is distributed or striped across the four busses 806 (in this example, across thirty-two bytes) and transmitted to the memory device(s) located on memory modules 810 via the busses 806. In the example circuitry depicted in FIG. 9, each bus 806 receives eight bytes of data and control information and up to one byte of the ECC code.

As depicted in FIG. 9, memory access requests to read data are received from the processor 902 by the memory controller 804. The read requests include at least a single real address provided from the VATT 938 that correlates to the requested data. The memory controller 804 retrieves the data from the memory devices located on the module(s) 810 via the four busses 806. In the exemplary embodiment depicted in FIG. 9, all four of the busses 806 are utilized to receive data (thirty-two bytes) and an ECC code (up to four bytes) from the memory devices 810. The ECC checking and correction circuit 930 performs ECC processing on all four busses 806. If an error is found by the ECC checking and correcting circuitry 930, then an error message 936 is transmitted to the processor 902, via control block 940 to the processor 902 or alternately to a service processor, I/O or other device associated with error reporting and interpretation/response. In alternate exemplary embodiments, any or all of the write requests are implemented as read-modify-write requests.

FIG. 10 depicts exemplary circuitry for responding to a memory access request by dynamically determining the busses and other functional units utilized to complete the request. In addition, FIG. 10 depicts exemplary ECC circuitry where the ECC bits are distributed across one, two or four interface busses 806 depending on the requirements of the memory access request. The circuitry depicted in FIG. 10 is similar to the circuitry depicted in FIG. 9 except that only the busses 806 required by the current memory access are utilized and that ECC codes are generated and checked only for the busses 806 being utilized by the current memory access request. Control block 1050 decodes the address, command and associated information from the processor and selects and configures the write queue and ECC generator circuitry 926, 1004, 1006, 1008, 1010, 1012 and/or 1014 during write operations and ECC check/correct circuitry 930, 1024, 1026, 1028, 1030, 1032 and/or 1034 during read operations. Errors identified during data transfer and/or ECC operations are reported to control block 1050 and/or error lines 936 for error recovery and communication to processor 902, depending on the system design. Although not shown, additional circuitry in the memory controller, such as bus transceivers, configuration registers, timing control circuitry, self-test circuitry, etc. also participate in the memory interface operation, but are not shown as these functions are widely practiced in the art. In addition, the VATT 938 in FIG. 10 includes the addition of ‘hint’ information which is passed to the memory controller, in conjunction with the “real” address, via processor signals 918. The VATT 938 is utilized to store hint information about the busses 806 and ECC circuitry being utilized by the current memory access request. The VATT 938 may be a separate element from the processor 902, or it may be contained within the processor 902 as depicted in FIG. 10.

In exemplary embodiments, if a write operation is being performed and it only utilizes the first two busses 806, then the ECC codes generated by ECC generator 1006 will be written to the memory modules 810 via the first two busses 806. The writing of the associated ECC codes and data is controlled by the memory controller 804 in response to the hint information stored in the VATT 938, by selecting the ECC information from multiplexer 1016 and multiplexer 1018, which is then appended to the data being written to the first two busses 806. In this manner, and depending on the selected ECC generator circuitry, two one-byte or one two-byte ECC code(s) is created and stored with the sixteen bytes of data being written in response to the memory access request. If an error is found by the ECC checking and correcting circuitry 1036 during a subsequent read, then an error message 936 is reported to the processor (and/or other error processing circuitry) indicating at least the failing bus(ses) 806 is transmitted to the processor 902.

A similar process occurs when data is read from a subset of the busses 806. Only the valid data (based on hint information about the associated busses 806 stored in the VATT 938) are transmitted to the processor 902 in response to a memory access request that includes a read request. One or more control signal(s) to the applicable multiplexer(s) is created, by the memory controller, based on the hint information, to select the valid output data path through the ECC check/correction logic 930, 1024, 1026, 1028, 1030, 1032, and/or 1034 and multiplexer 1040, 1042, 1044 and/or 1046 based on the information stored in the VATT 938 and decoded by control block 1050.

In response to a request to the memory controller 804 to retrieve or store data with an indication of “1-way interleave” or a “2-way interleave”, the memory controller 804 initiates an access to the requested physical address to select which bus(ses) 806 is required to access the memory device(s) on memory module(s) 810 with the requested data. Other busses 806 remain unaffected and available for the memory controller 804 to initiate other requests concurrently. For example, in a four channel memory system, during the same clock cycle, the first bus 806 may be processing a first memory access request, the second bus 806 may be processing a second memory access request and the third and fourth busses 806 may be processing a third memory access request.

For write requests, the memory controller 804 directs the valid data to the ECC generation circuit(s) (926, 1004, 1006, 1008, 1010, 1012 and/or 1014) based on the hint information provided the memory controller 804 by the processor 902 (in response to the information stored in the VATT 938) to generate the ECC check bits, and then the combined data/check bits (ECC word) are directed to the selected memory interface bus(ses) where the 1^(st) memory module(s) receives the information, re-drives or by-passes the information to the next memory module and/or interprets the information (in the hub chip) to determine the required action. In the simplest embodiment, once the hub chip determines that the bus information is related to a write operation to that memory module, the hub generates the command, address and timing sequences required to complete the write operation to the memory devices. In alternate embodiments, the write operation may be postponed due to higher priority operations in-process or scheduled on the memory module, with the write request and associated address and data temporarily stored in a write buffer for later execution. Additional functions that may reside local to the memory subsystem, generally within the hub chip, include one or more levels of local memory cache, data encryption/decryption, data compression/decompression, protocol translation, command prioritization logic, voltage and/or level translation, error detection and/or correction circuitry, data scrubbing, local power management circuitry and/or reporting, operational and/or status registers, initialization circuitry, performance monitoring and/or control, one or more co-processors, search engine(s) and other functions that may have previously resided in other subsystems.

For read requests, in the simplest embodiment, the selected memory hub chip(s) services the read request from the memory controller 804 by reading data from the DRAM devices 814 and forwarding the resulting ECC word(s), often received from the memory devices in a burst of 4 or 8 transfers, to the memory controller 804 via the memory bus(ses) 806. The memory controller 804 receives the expected read data from the one or more memory busses 806 and directs the ECC word(s) to the ECC circuits 930, 1024, 1026, 1028, 1030, 1032 and/or 1034 to check for errors that may be present in the data and correct data (if required) before transferring the validated data to the requester on the data reply bus with associated attributes. Based on the hint information associated with the read request, the multiplex circuitry 1040, 1042, 1044 and 1046 will select the outputs from the appropriate one or more ECC check/correction circuits involved in the read operation. In addition, this hint information will further enable the correct one or more ECC check/correction circuits via the control block 1050, such that the ECC check/correction circuits not involved in the read operation are available for use by other simultaneous operations, placed in a lower power state or otherwise unused.

The circuitry depicted in FIG. 10 represents a logical view of the processing to be performed by the ECC logic. In exemplary embodiments, the physical implementation (i.e., the physical XOR gates) will be different (e.g., several of the physical XOR gates may be shared across two or more of the ECC check/correction circuit blocks if parallel operations are not supported, or in a manner that does not impede parallel operations). Any physical implementation (hardware and/or software) that supports the logic circuitry depicted in FIG. 10 where the access hint, or hint state, associated with a memory access request dynamically selects the busses 806 and the appropriate ECC mode utilized for one or more read or write operations may be implemented by exemplary embodiments.

FIGS. 11 a-c depict exemplary real to physical address mappings that may be implemented by exemplary embodiments based on hint data stored in a VATT. In exemplary embodiments, the processor 902 (or some other device) initiates an access to memory. The VATT 938 maps the access request to a “real” memory address range. When the data is resident in the local cache memory 908, the real address from the VATT 938 correlates to a real address in the cache memory 908, and the access is completed using the contents of the cache memory 908. If the cache memory 908 does not contain the real address, the memory controller 804 maps the real address to a “physical address” (i.e., a row/column address on one or more memory devices in a memory module 810 in a given memory device technology), and the memory modules 810 provide access to the data on the memory devices. Exemplary embodiments expose the physical mapping to the VATT 938 by way of a data organization hint, such that the system software, via the hints stored in the VATT 938, can control the mapping of real addresses to physical addresses.

FIG. 11 a depicts an exemplary VATT 938 that may be utilized by exemplary embodiments to map real addresses to physical addresses based on hint data in the VATT. The VATT 938 includes a page table 1102 that includes page table entries 1106. The page table entries 1106 include a “real” address for the data, which is later converted to a “physical” device address by the memory controller, as well as an access hint 1108 (also referred to as a “hint state” or a “hint”) describing how the data is stored in main memory 1104 on the memory module(s) 810. In the exemplary embodiment depicted in FIG. 11 a, each page table entry 1106 is associated with a physical 4K page. In exemplary embodiments, the access hint 1108 for the first page table entry 1106 specifies that the data should be retrieved using a single bus (e.g. an eight byte data width), and this results in a 4K page of addresses 1114 in the main memory 1104 being accessed. As described previously, only one bus 806 would need to be utilized to satisfy this memory access request, since the physical page address range was defined as being associated with the memory address range within the memory located on a single bus. As shown in the second page table entry 1106, a second software application may include a virtual address which maps to a real address and access hint, as shown in the second page table entry 1106, which is associated with the same physical address as the first page table entry, as depicted in 1112, which overlaps the same address space 1114 associated with the first page table entry as depicted in 1110.

In exemplary embodiments, the access hint 1108 for an alternate one or more table entries may specify that a 4K page of data should be retrieved using all of the four available busses, with the page 1112 defined as being associated with the memory address range within the memory devices located across all 4 memory busses 806. As described previously, four busses 806 would be utilized to satisfy this memory access request. In further applications, the 4K page may be physically separated (by other intermediate addresses) such that a portion of the physical 4K page resides on one, two or more memory channels (and associated modules), such that the address space may be accessed via one or more accesses, each to one or more memory channels, to permit most efficient use of the memory space based on access priority.

FIG. 11 b is an example of a portion of a physical memory address map and three different methods in which a 4K page can be physically addressed based on an access hint 1108 in the VATT 938 using exemplary embodiments. The example depicted in FIG. 11 b includes a memory system with one, two or four memory modules 810 (e.g., DIMMs), with each DIMM attached to one of the four memory busses 806. The VATT 938 may include an access hint 1108 to direct the memory controller 804 to access all four memory modules 810 via the four busses 806, with each memory module 810 providing one fourth of the 4K page as shown in the physical address space 1120. With a different access hint 1108, the VATT 938 may direct the memory controller 804 to access two of the four memory modules 810 via a subset of the busses 806, accessing a 4K page as shown in physical address space 1122. Given yet another access hint 1108, the VATT 938 may direct the memory controller to access a 4K page residing on a single memory module 810, as shown in physical address space 1124. As shown by FIG. 11 b, independent page table entries may be mapped to a portion of the same physical address range (e.g., the shared physical regions associated with 1120, 1122 and 1124) based on the content of the access hint 1108 in the VATT.

FIG. 11 c is an example of a portion of a physical memory address map and three different methods in which a 128 byte cache line access (e.g., a portion of the highlighted 4K page 1136) can be physically addressed based on an access hint 1108 in the VATT 938 using exemplary embodiments. The example depicted in FIG. 11 c shows how four memory channels can service a 128 byte cache line access, where each memory module 810 accesses 32 bytes (physical address space 1130). When the VATT access hint 1108 directs the memory controller 804 to access only two of the four memory modules 810 (e.g., DIMM0 and DIMM1), physical address space 1132 consists of two memory modules 810, each accessing 64 bytes. Given a third data organization or access hint 1108, physical address space 1134 would be accessed, on a single DIMM (e.g., DIMM0), with the other memory channels and associated memory modules 810 available to be accessed simultaneously.

The ability to access all or a portion of the same physical memory space in main memory 1104 in different manners may be useful in a variety of applications. One example is when the data is contained in a database or matrix. Certain memory access requests may apply to functions that manipulate row data and therefore access to all four busses 806 would be the most efficient for accessing the data. Other application functions may create memory access requests that manipulate column data and therefore access to a subset of the busses 806 would allow the data to be accessed and would free up the other busses 806 for use by other applications.

FIG. 12 is a process flow for processing a memory access request that is a read request according to exemplary embodiments. At block 1202, a read request, including a virtual address, is received from the CPU 906 or cache memory 908 by the VATT 938. At block 1204, the virtual address is used by the VATT 938 to find the associated real address(es) as well as to access hint information (or a hint state) defining the optimal bus 806 utilization to process the read request. In exemplary embodiments, the access hint specifies how many bytes of data should be read to satisfy the memory access request, in other embodiments, the access hint specifies which busses 806 should be accessed to process the read request (also referred to as the interleave mode). At block 1206, only the bus(ses) 806 derived based on the access hint is activated and accessed by the memory controller 804. At block 1208 in FIG. 12, the data and ECC code are read from the memory devices 814 on module(s) 810 attached to the bus(ses) 806 being accessed by the memory controller 804. At block 1210, an ECC check is performed on just the accessed bus(ses) 806 and at block 1212, the data is sent to the requester.

FIG. 13 is a process flow for processing a memory access request that is a write request according to exemplary embodiments. At block 1302, a write request, including application access information and data to be written is initiated by the CPU 906 or cache memory 908 in processor 902. At block 1304, in response to this access request, the VAAT 938 is accessed to identify the “real” address(es) on the memory devices 814, as well as the associated bus(ses) 806 to be used for the write operation, as stored by the operating systems (OS) during the creation of that portion of the VATT 938 during the initial start-up of the application software, or during a period during operation when application software requests memory resource for data. At block 1306, an ECC code is created for just the associated busses 806 using the circuitry 1038, with the ECC code applied across eight bytes, 16 bytes or 32 bytes of data in the exemplary embodiment. At block 1308, the data and ECC code is written to the memory device(s) 810, by memory controller 936 at the physical address using only the associated bus(ses) 806.

Although FIG. 10 shows only a subset of the key elements constituting the memory controller 804, the memory controller function is well known in the art to further comprise control logic to direct all internal operations as well as the interface to the one or more processors, the one or more memory busses, one or more I/O interfaces and other subsystems normally found in a computer system. In addition, ECC circuitry may or may not reside in the memory controller 804, and if present, may or may not be activated for a given application.

Exemplary embodiments, such as those described herein offer significant system performance benefit potential by enabling a software application to dynamically control the memory access method, thereby permitting the selection of the optimal memory access methods (e.g, the channel(s), associated bus(ses) and/or ECC utilization) for a given operation. Application software that does not include memory access “hint” information will result in traditional memory access methods, e.g., the use of all available memory access channels and associated busses for all accesses, thereby also eliminating the potential to complete simultaneous independent memory accesses.

As used herein the term “memory devices” 814 are generally defined as integrated circuits that are composed primarily of memory (storage) cells, such as DRAMs (Dynamic Random Access Memories), SRAMs (Static Random Access Memories), FeRAMs (Ferro-Electric RAMs), asynchronous RAMs, MRAMs (Magnetic Random Access Memories), Flash Memory and other forms of random access and related memories that store information (temporarily or long-term) in the form of electrical, optical, magnetic, biological or other means. Dynamic memory device types may include asynchronous memory devices such as FPM DRAMs (Fast Page Mode Dynamic Random Access Memories), EDO (Extended Data Out) DRAMs, BEDO (Burst EDO) DRAMs, SDR (Single Data Rate) Synchronous DRAMs, DDR (Double Data Rate) Synchronous DRAMs, DDR (Double Data Rate) Synchronous DRAMs of any of the expected follow-on devices such as DDR2, DDR3, DDR4 and related technologies such as Graphics RAMs, Video RAMs, LP RAM (Low Power DRAMs) which are often based on the fundamental functions, features and/or interfaces found on related DRAMs.

Information passing to the memory devices 814 from memory controller 806 will generally be composed of a minimum of address, command and data, and may include other signals generally associated with requesting or reporting status or error conditions, resetting the memory, completing memory or logic initialization and other related functional, configuration or related information. Information passing from the memory devices 810 may include any or all of this information, however generally will not include address and command information. This information may be communicated using communication methods consistent with normal memory device interface specifications (which are generally parallel in nature), the information may be encoded into a ‘packet’ structure—which may be consistent with future memory interfaces or which may be memory technology-independent to enable the subsystem to operate independently of the memory technology by converting the received information into the format required by the receiving device(s).

Technical effects and benefits of exemplary embodiments include the ability to retrieve data from memory devices in fewer clock cycles by allowing one or more memory access requests to be performed concurrently. Concurrent execution is possible when two memory access requests require access to different busses to be completed. Access hint information is utilized by the memory controller to determine what busses are required for a current memory access request. Based on this information, the memory controller can determine if there is another memory access request in the queue that can be performed concurrently with the current memory access request (i.e., one that used one or more different busses). In addition, exemplary embodiments provide ECC functions for only the busses utilized by a memory access request, thereby providing ECC protection of the data on the one or more busses being utilized.

As described above, the embodiments of the invention may be embodied in the form of computer-implemented processes and apparatuses for practicing those processes. Embodiments of the invention may also be embodied in the form of computer program code containing instructions embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other computer-readable storage medium, wherein, when the computer program code is loaded into and executed by a computer, the computer becomes an apparatus for practicing the invention. The present invention can also be embodied in the form of computer program code, for example, whether stored in a storage medium, loaded into and/or executed by a computer, or transmitted over some transmission medium, such as over electrical wiring or cabling, through fiber optics, or via electromagnetic radiation, wherein, when the computer program code is loaded into and executed by a computer, the computer becomes an apparatus for practicing the invention. When implemented on a general-purpose microprocessor, the computer program code segments configure the microprocessor to create specific logic circuits.

While the invention has been described with reference to exemplary embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from the essential scope thereof. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed as the best mode contemplated for carrying out this invention, but that the invention will include all embodiments falling within the scope of the appended claims. Moreover, the use of the terms first, second, etc. do not denote any order or importance, but rather the terms first, second, etc. are used to distinguish one element from another. 

1. A computer memory system for storing and retrieving data, the system comprising: a memory including a plurality of memory devices organized into one or more physical groups, wherein each group is accessible via an associated bus for transferring data and control information; a memory controller for receiving and responding to memory access requests that include application access information to control access pattern and data organization within the memory, the responding including accessing one or more memory devices in one or more of the physical groups via the associated busses; and a virtual memory management system including a plurality of page table entries for mapping virtual memory addresses to real addresses in the memory and also including hint states in the page table entries responsive to memory allocation requests and application access information for indicating how real memory for associated pages is to be physically organized within the memory, and a means for conveying a hint state to the memory controller when a memory access request is directed to the memory controller to access the memory; and wherein the responding further includes selecting which of the associated busses will be used to satisfy the memory access request responsive to the physical memory organization conveyed to the memory controller in the hint state.
 2. The system of claim 1, wherein the responding further includes selecting which error detection and correction logic will be utilized to protect data integrity, the selection responsive to the physical memory organization state conveyed to the memory controller in the hint state.
 3. The system of claim 1, wherein the responding further includes grouping multiple pending memory access requests for optimal memory throughput by servicing pending requests from pending or queued requests which have complementary interleave attributes at the same time.
 4. The system of claim 1, wherein the virtual memory management system transmits a page table entry associated with the memory access request to the memory controller.
 5. The system of claim 1, wherein the responding further includes generating and checking error correction codes for information transferred on the associated busses, wherein the generating is performed on data being written to one or more memory devices and the checking is performed on data being read from one or more memory devices.
 6. A memory system comprising: a plurality of busses for transferring information to memory devices; and a memory controller in communication with the busses for receiving memory access requests and for initiating an information transfer on one or more of the busses to respond to the memory access requests, wherein the memory controller determines on a cycle by cycle basis which of the busses are required to respond to each of the memory access requests based on a memory access pattern associated with each memory access request; and a virtual address translation table (VATT) which includes an address range and an access hint defined by an operating system (OS), wherein the access hint affects all subsequent memory access requests to the address range, the access hint can be changed by the OS during system operation, and the access hint is utilized by the memory controller to determine which of the busses are required to satisfy the memory access request.
 7. The memory system of claim 6 wherein any unused busses for one of the memory access requests may be utilized concurrently to perform an other of the memory access requests.
 8. The memory system of claim 6 wherein the access hint includes the one or more busses required to satisfy the memory access request for the address range.
 9. The memory system of claim 6 wherein the access hint includes a preferred access granularity for the address range.
 10. The memory system of claim 6 wherein the VATT includes entries defining how virtual addresses are mapped to real addresses on the memory devices.
 11. The memory subsystem of claim 6 wherein a memory error correction code (ECC) generation and checking circuit is operable across one or more of the busses.
 12. The memory subsystem of claim 6 wherein one or more of system software and a VATT provides information about what ECC encode and decode circuits are to be utilized to support the memory access request.
 13. The memory subsystem of claim 6 wherein the memory controller schedules memory accesses to maximize throughput based on bus utilization. 